﻿<Window x:Class="VolumeMaster.OSDWindow"
        xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
        xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
        x:Name="mainWin"
        Deactivated="mainWin_Deactivated"
        MouseLeftButtonDown="mainWin_MouseLeftButtonDown"
        MouseEnter="mainWin_MouseEnter" 
        MouseLeave="mainWin_MouseLeave"
        WindowStartupLocation="Manual"
        WindowStyle="None"
        Topmost="True" ShowInTaskbar="False" 
        MaxHeight="300" MaxWidth="80"
        Height="300" Width="80"
        >
    <Window.Resources>
        <Style TargetType="TextBlock">
            <Setter Property="HorizontalAlignment" Value="Center" />
            <Setter Property="VerticalAlignment" Value="Top" />
            <Setter Property="Margin" Value="0,10,0,0" />
            <Setter Property="FontFamily" Value="Calibri" />
            <Setter Property="FontSize" Value="14" />
            <Setter Property="Cursor" Value="Hand" />
            <Style.Triggers>
                <Trigger Property="IsMouseOver" Value="True">
                    <Setter Property="TextDecorations" Value="Underline" />
                </Trigger>
            </Style.Triggers>
        </Style>

        <Style TargetType="Image" x:Key="MuteStyle">
            <Setter Property="Width" Value="20" />
            <Setter Property="Height" Value="20" />
        </Style>

        <Image 
            x:Key="MuteOff"
            Source="MuteOff.png"
            Style="{StaticResource MuteStyle}"/>
        <Image 
            x:Key="MuteOn"
            Source="MuteOn.png"
            Style="{StaticResource MuteStyle}" />

        <Style TargetType="Button">
            <Setter Property="Background" Value="Transparent" />
            <Setter Property="BorderBrush" Value="Transparent" />
            <Setter Property="Foreground" Value="Transparent" />
            <Setter Property="Focusable" Value="False" />
        </Style>

        <LinearGradientBrush x:Key="BlueGradient" StartPoint="0.5,0" EndPoint="0.5,1">
            <GradientStop Color="#D9E3F0" Offset="0" />
            <GradientStop Color="#F1F5FB" Offset=".1" />
            <GradientStop Color="#F1F5FB" Offset="1" />
        </LinearGradientBrush>

    </Window.Resources>
    <Window.ContextMenu>
        <ContextMenu>
            <MenuItem Header="Exit" Click="Exit_Click" />
        </ContextMenu>
    </Window.ContextMenu>
    <Grid>
        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition />
            <RowDefinition Height="Auto" />
            <RowDefinition Height="Auto" />
        </Grid.RowDefinitions>
        <Button Margin="16,10,16,0" Click="Speaker_Click">
             <Image Source="Speaker.png" />
        </Button>

        <ProgressBar Name="VolumeProgressBar" Grid.Row="1"
                     Orientation="Vertical"
                     HorizontalAlignment="Center"
                     Width="16"
                     Margin="0,10,0,10"
                     Minimum="0" Maximum="1" />

        <Button Name="MuteButton"
                Margin="16,0,16,10"
                Grid.Row="2" 
                HorizontalContentAlignment="Center"
                Content="{StaticResource MuteOff}" 
                Click="MuteButton_Click" />

        <Border 
            Grid.Row="3" 
            BorderThickness="0,1,0,0" 
            BorderBrush="#C7D3E2" 
            Height="40"    
            Background="{StaticResource BlueGradient}">
            <TextBlock 
                Text="Mixer"
                Foreground="#0066CC"
                MouseDown="MixerLink_MouseDown" />
        </Border>

    </Grid>
</Window>
